//
//  YDYLiveTableViewHeader.m
//  DY_Bilibili
//
//  Created by 杨德勇 on 2016/10/9.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import "YDYLiveTableViewSectionHeader.h"
#import "YDYPartitionMessage.h"
#import "YDYSubIcon.h"
#import <UIImageView+WebCache.h>
@interface YDYLiveTableViewSectionHeader()
//分区小图标
@property (weak, nonatomic) IBOutlet UIImageView *subIconImgV;
//目前分区人数
@property (weak, nonatomic) IBOutlet UILabel *currentLiveNumL;
//分区名字
@property (weak, nonatomic) IBOutlet UILabel *partitionNameL;

@end

@implementation YDYLiveTableViewSectionHeader
-(void)setPartitionMessage:(YDYPartitionMessage *)partitionMessage{
    _partitionMessage = partitionMessage;
    [self.subIconImgV sd_setImageWithURL:[NSURL URLWithString:partitionMessage.sub_icon.src]];
    
    self.partitionNameL.text = partitionMessage.name;
    self.currentLiveNumL.text = [NSString stringWithFormat:@"当前有%ld个主播正在播放",partitionMessage.count];
    [self layoutIfNeeded];
    
}
@end
